package com.heima.tabletennis_basketball;

public class Trainer extends Person{

    public Trainer(String name, String ball) {
        super(name, ball);
    }

    @Override
    public void study() {
        if(getBall().equals("乒乓球")){
            System.out.println("乒乓球教练"+getName()+"学英语去");
        }else {
            System.out.println("篮球教练"+getName()+"学好母语");
        }
    }
}
